import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'

import store from './store'
Vue.prototype.$store = store

import commonMixins from '@/mixins/common.js';
Vue.mixin(commonMixins);

// 全局注册 导航栏 组件
import pubHead from './components/pubHeader/index.vue'
Vue.component('pub-head', pubHead)
import pubLoading from './components/pubLoading/index.vue'
Vue.component('pub-loading', pubLoading)
import pubDialog from './components/pubDialog/index.vue'
Vue.component('pub-dialog', pubDialog)
import pubTabbar from './components/pubTabbar/index.vue'
Vue.component('pub-tabbar', pubTabbar)
import pubImage from './components/pubImage/index.vue'
Vue.component('pub-image', pubImage)
import pubSearch from './components/pubSearch/index.vue'
Vue.component('pub-search', pubSearch)

import comFun from '@/common/js/common'
import request from '@/common/js/request'
import constant from '@/common/js/constant'//常量
Vue.prototype.$comFun = comFun;
Vue.prototype.$request = request;
Vue.prototype.$constant = constant;

// App权限判断和提示
import permision from "@/js_sdk/wa-permission/permission.js"
Vue.prototype.$permision = permision;

// 下拉刷新/滚动加载组件 
// z-paging 使用文档 https://z-paging.zxlee.cn/api/props/global-config.html
uni.$zp = {
  config: {
    //配置分页默认pageSize为15
    'default-page-size': 15,
    //配置空数据图默认描述文字为：空空如也~~
    'empty-view-text': '空空如也~~',
    'empty-view-img': '/static/common/nodata_1.png',
    'show-loading-more-no-more-line': false,
    'show-loading-more-no-more-view': false,
    'auto': false,
  }
}

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif
